from django.conf.urls.defaults import *
from website.forum.views import *
from django.contrib import admin
admin.autodiscover()

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
	(r'^admin/', include(admin.site.urls)),
	(r'^addtheme/', addtheme),
	(r'^adddiscussion/(\d{1,2})/$', adddiscussion),
	(r'^discussion/(\d{1,2})/$', showtopic),
	(r'^addtopic/(\d{1,2})/$', addtopic),
	(r'^$', index),
	(r'^theme/(\d{1,2})/$', show_discussion),
	(r'^accounts/login/$',  login),
	(r'^accounts/logout/$', logout),
	(r'^accounts/registration/([\w]{1,30})/$', confirmregistration),
	(r'^accounts/registration/$', registration),
	
)

from django.conf import settings
if settings.DEBUG:
    urlpatterns += patterns('',
        (r'^(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'templates/forum'}),
    )